package com.swm.util1;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.swm.mapper.StockJsonDataMapper;
import com.swm.pojo.Stock;
import com.swm.pojo.Stock_Json_Data;
import com.swm.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import static com.swm.util.getStockDayData4.times;
import static com.swm.util1.ConditionUtil.getMoneyBL;
import static com.swm.util1.ConditionUtil.getPriceBL;

/**
 * @author 师文明
 * @data 2024/12/23 下午3:11
 **/
public class 看涨吞没 {

    //0-20
    public static double sumz020;
    public static double sumf020;
    public static double sum020;
    public static int num0020;
    public static int numu020;
    public static int numd020;
    public static int ban020 = 0;
    public static double sum2020;
    public static int numu2020;
    public static int numd2020;
    public static int ban0220 = 0;

    private static ArrayList<String> dateList020 = new ArrayList<String>();
    //20-50
    public static double sumz2050;
    public static double sumf2050;
    public static double sum2050;
    public static double sum22050;
    public static double sum32050;
    public static double sum52050;
    public static double sum102050;
    public static double sum202050;
    public static int num02050;
    public static int numu2050;
    public static int numd2050;
    public static int numu22050;
    public static int numd22050;
    public static int numu32050;
    public static int numd32050;
    public static int numu52050;
    public static int numd52050;
    public static int numu102050;
    public static int numd102050;
    public static int numu202050;
    public static int numd202050;
    public static int ban2050 = 0;
    private static ArrayList<String> dateList2050 = new ArrayList<String>();
    //50-100
    public static double sumz50100;
    public static double sumf50100;
    public static double sum50100;
    public static double sum250100;
    public static double sum350100;
    public static double sum550100;
    public static double sum1050100;
    public static double sum2050100;
    public static int num050100;
    public static int numu50100;
    public static int numd50100;
    public static int numu250100;
    public static int numd250100;
    public static int numu350100;
    public static int numd350100;
    public static int numu550100;
    public static int numd550100;
    public static int numu1050100;
    public static int numd1050100;
    public static int numu2050100;
    public static int numd2050100;
    public static int ban50100 = 0;
    private static ArrayList<String> dateList50100 = new ArrayList<String>();
    //100-200
    public static double sumz100200;
    public static double sumf100200;
    public static double sum100200;
    public static double sum2100200;
    public static double sum3100200;
    public static double sum5100200;
    public static double sum10100200;
    public static double sum20100200;
    public static int num0100200;
    public static int numu100200;
    public static int numd100200;
    public static int numu2100200;
    public static int numd2100200;
    public static int numu3100200;
    public static int numd3100200;
    public static int numu5100200;
    public static int numd5100200;
    public static int numu10100200;
    public static int numd10100200;
    public static int numu20100200;
    public static int numd20100200;
    public static int ban100200 = 0;
    private static ArrayList<String> dateList100200 = new ArrayList<String>();
    //200-300
    public static double sumz200300;
    public static double sumf200300;
    public static double sum200300;
    public static double sum2200300;
    public static double sum3200300;
    public static double sum5200300;
    public static double sum10200300;
    public static double sum20200300;
    public static int num0200300;
    public static int numu200300;
    public static int numd200300;
    public static int numu2200300;
    public static int numd2200300;
    public static int numu3200300;
    public static int numd3200300;
    public static int numu5200300;
    public static int numd5200300;
    public static int numu10200300;
    public static int numd10200300;
    public static int numu20200300;
    public static int numd20200300;
    public static int ban200300 = 0;
    private static ArrayList<String> dateList200300 = new ArrayList<String>();

    //300-400
    public static double sumz300400;
    public static double sumf300400;
    public static double sum300400;
    public static double sum2300400;
    public static double sum3300400;
    public static double sum5300400;
    public static double sum10300400;
    public static double sum20300400;
    public static int num0300400;
    public static int numu300400;
    public static int numd300400;
    public static int numu2300400;
    public static int numd2300400;
    public static int numu3300400;
    public static int numd3300400;
    public static int numu5300400;
    public static int numd5300400;
    public static int numu10300400;
    public static int numd10300400;
    public static int numu20300400;
    public static int numd20300400;
    public static int ban300400 = 0;
    private static ArrayList<String> dateList300400 = new ArrayList<String>();

    //400-500
    public static double sumz400500;
    public static double sumf400500;
    public static double sum400500;
    public static double sum2400500;
    public static double sum3400500;
    public static double sum5400500;
    public static double sum10400500;
    public static double sum20400500;
    public static int num0400500;
    public static int numu400500;
    public static int numd400500;
    public static int numu2400500;
    public static int numd2400500;
    public static int numu3400500;
    public static int numd3400500;
    public static int numu5400500;
    public static int numd5400500;
    public static int numu10400500;
    public static int numd10400500;
    public static int numu20400500;
    public static int numd20400500;
    public static int ban400500 = 0;
    private static ArrayList<String> dateList400500 = new ArrayList<String>();

    //500-600
    public static double sumz500600;
    public static double sumf500600;
    public static double sum500600;
    public static double sum2500600;
    public static double sum3500600;
    public static double sum5500600;
    public static double sum10500600;
    public static double sum20500600;
    public static int num0500600;
    public static int numu500600;
    public static int numd500600;
    public static int numu2500600;
    public static int numd2500600;
    public static int numu3500600;
    public static int numd3500600;
    public static int numu5500600;
    public static int numd5500600;
    public static int numu10500600;
    public static int numd10500600;
    public static int numu20500600;
    public static int numd20500600;
    public static int ban500600 = 0;
    private static ArrayList<String> dateList500600 = new ArrayList<String>();

    //600-700
    public static double sumz600700;
    public static double sumf600700;
    public static double sum600700;
    public static double sum2600700;
    public static double sum3600700;
    public static double sum5600700;
    public static double sum10600700;
    public static double sum20600700;
    public static int num0600700;
    public static int numu600700;
    public static int numd600700;
    public static int numu2600700;
    public static int numd2600700;
    public static int numu3600700;
    public static int numd3600700;
    public static int numu5600700;
    public static int numd5600700;
    public static int numu10600700;
    public static int numd10600700;
    public static int numu20600700;
    public static int numd20600700;
    public static int ban600700 = 0;
    private static ArrayList<String> dateList600700 = new ArrayList<String>();

    //700+
    public static double sumz700u;
    public static double sumf700u;
    public static double sum700u;
    public static double sum2700u;
    public static double sum3700u;
    public static double sum5700u;
    public static double sum10700u;
    public static double sum20700u;
    public static int num0700u;
    public static int numu700u;
    public static int numd700u;
    public static int numu2700u;
    public static int numd2700u;
    public static int numu3700u;
    public static int numd3700u;
    public static int numu5700u;
    public static int numd5700u;
    public static int numu10700u;
    public static int numd10700u;
    public static int numu20700u;
    public static int numd20700u;
    public static int ban700u = 0;
    private static ArrayList<String> dateList700u = new ArrayList<String>();

    public static double sumzall;
    public static double sumfall;
    public static double sumall;
    public static double sum2all;
    public static double sum3all;
    public static double sum5all;
    public static double sum10all;
    public static double sum20all;
    public static int num0all;
    public static int numuall;
    public static int numdall;
    public static int numu2all;
    public static int numd2all;
    public static int numu3all;
    public static int numd3all;
    public static int numu5all;
    public static int numd5all;
    public static int numu10all;
    public static int numd10all;
    public static int numu20all;
    public static int numd20all;
    public static int banall = 0;
    private static ArrayList<String> dateListall = new ArrayList<String>();

    public static DecimalFormat df = new DecimalFormat("#0.000");

    static SqlSession sqlSession = SqlSessionUtil.openSession();
    static StockJsonDataMapper stockJsonDataMapper = sqlSession.getMapper(StockJsonDataMapper.class);

    public static void main(String[] args) throws Exception {
        List<Stock_Json_Data> stockJsonDatalist = stockJsonDataMapper.selectStockJsonData();
        System.out.println(stockJsonDatalist.size());
        if(stockJsonDatalist.size()>0){

            ExecutorService executorService = Executors.newFixedThreadPool(50);
            for (Stock_Json_Data stockJsonData : stockJsonDatalist) {
                executorService.execute(() -> {
                    try {
                        getData(stockJsonData);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                });
            }
            Thread.sleep(200000);

            double v020 = 0;
            double vz020 = 0;
            double vf020 = 0;

            double v2020 = 0;
            System.out.println("120天内低位蛟龙出海");
            System.out.println("------------------------");
            if (num0020 != 0 && sum020 != 0) {
                v020 = sum020 / num0020;
                vz020= sumz020 / numu020;
                vf020= sumf020 / numd020;
            }
            if (num0020 != 0 && sum2020 != 0) {
                v2020 = sum2020 / num0020;
            }
            System.out.println("0-20");
            System.out.println(("一天后涨的次数：" + numu020 + "  跌的次数：" + numd020 + "  上涨概率： " + df.format((double) numu020 * 100 / num0020)) + "%  平均涨跌幅：" + df.format(v020)+ "%  平均涨幅：" + df.format(vz020)+ "%  平均跌幅：" + df.format(vf020));
            System.out.println(("第二天涨的次数：" + numu2020 + "  跌的次数：" + numd2020 + "  上涨概率： " + df.format((double) numu2020 * 100 / num0020)) + "%  平均涨跌幅：" + df.format(v2020));
            System.out.println("板数：" + ban020);
            System.out.println("中股天数："+dateList020.size());


            double v2050 = 0;
            double vz2050 = 0;
            double vf2050 = 0;
            double v22050 = 0;
            double v32050 = 0;
            double v52050 = 0;
            double v102050 = 0;
            double v202050 = 0;

            if (num02050 != 0 && sum2050 != 0) {
                v2050 = sum2050 / num02050;
                vz2050= sumz2050 / numu2050;
                vf2050= sumf2050 / numd2050;
            }
            if (num02050 != 0 && sum22050 != 0) {
                v22050 = sum22050 / num02050;
            }
            if (num02050 != 0 && sum32050 != 0) {
                v32050 = sum32050 / num02050;
            }
            if (num02050 != 0 && sum52050 != 0) {
                v52050 = sum52050 / num02050;
            }
            if (num02050 != 0 && sum102050 != 0) {
                v102050 = sum102050 / num02050;
            }
            if (num02050 != 0 && sum202050 != 0) {
                v202050 = sum202050 / num02050;
            }

            System.out.println("----------");
            System.out.println("20-50");
            System.out.println(("一天后涨的次数：" + numu2050 + "  跌的次数：" + numd2050 + "  上涨概率： " + df.format((double) numu2050 * 100 / num02050)) + "%  平均涨跌幅：" + df.format(v2050)+ "%  平均涨幅：" + df.format(vz2050)+ "%  平均跌幅：" + df.format(vf2050));
            System.out.println(("2天后涨的次数：" + numu22050 + "  跌的次数：" + numd22050 + "  上涨概率： " + df.format((double) numu22050 * 100 / num02050)) + "%  平均涨幅：" + df.format(v22050));
            System.out.println(("3天后涨的次数：" + numu32050 + "  跌的次数：" + numd32050 + "  上涨概率： " + df.format((double) numu32050 * 100 / num02050)) + "%  平均涨幅：" + df.format(v32050));
            System.out.println(("5天后涨的次数：" + numu52050 + "  跌的次数：" + numd52050 + "  上涨概率： " + df.format((double) numu52050*100 / num02050))+"%  平均涨幅：" + df.format(v52050));
            System.out.println(("10天后涨的次数：" + numu102050 + "  跌的次数：" + numd102050 + "  上涨概率： " + df.format((double) numu102050*100 / num02050))+"%  平均涨幅：" + df.format(v102050));
            System.out.println(("20天后涨的次数：" + numu202050 + "  跌的次数：" + numd202050 + "  上涨概率： " + df.format((double) numu202050*100 / num02050))+"%  平均涨幅：" + df.format(v202050));
            System.out.println("板数：" + ban2050);
            System.out.println("中股天数："+dateList2050.size());


            double v50100 = 0;
            double vz50100 = 0;
            double vf50100 = 0;
            double v250100 = 0;
            double v350100 = 0;
            double v550100 = 0;
            double v1050100 = 0;
            double v2050100 = 0;

            if (num050100 != 0 && sum50100 != 0) {
                v50100 = sum50100 / num050100;
                vz50100= sumz50100 / numu50100;
                vf50100= sumf50100 / numd50100;
            }
            if (num050100 != 0 && sum250100 != 0) {
                v250100 = sum250100 / num050100;
            }
            if (num050100 != 0 && sum350100 != 0) {
                v350100 = sum350100 / num050100;
            }
            if (num050100 != 0 && sum550100 != 0) {
                v550100 = sum550100 / num050100;
            }
            if (num050100 != 0 && sum1050100 != 0) {
                v1050100 = sum1050100 / num050100;
            }
            if (num050100 != 0 && sum2050100 != 0) {
                v2050100 = sum2050100 / num050100;
            }

            System.out.println("----------");
            System.out.println("50-100");
            System.out.println(("一天后涨的次数：" + numu50100 + "  跌的次数：" + numd50100 + "  上涨概率： " + df.format((double) numu50100 * 100 / num050100)) + "%  平均涨跌幅：" + df.format(v50100)+ "%  平均涨幅：" + df.format(vz50100)+ "%  平均跌幅：" + df.format(vf50100));
            System.out.println(("2天后涨的次数：" + numu250100 + "  跌的次数：" + numd250100 + "  上涨概率： " + df.format((double) numu250100 * 100 / num050100)) + "%  平均涨幅：" + df.format(v250100));
            System.out.println(("3天后涨的次数：" + numu350100 + "  跌的次数：" + numd350100 + "  上涨概率： " + df.format((double) numu350100 * 100 / num050100)) + "%  平均涨幅：" + df.format(v350100));
            System.out.println(("5天后涨的次数：" + numu550100 + "  跌的次数：" + numd550100 + "  上涨概率： " + df.format((double) numu550100*100 / num050100))+"%  平均涨幅：" + df.format(v550100));
            System.out.println(("10天后涨的次数：" + numu1050100 + "  跌的次数：" + numd1050100 + "  上涨概率： " + df.format((double) numu1050100*100 / num050100))+"%  平均涨幅：" + df.format(v1050100));
            System.out.println(("20天后涨的次数：" + numu2050100 + "  跌的次数：" + numd2050100 + "  上涨概率： " + df.format((double) numu2050100*100 / num050100))+"%  平均涨幅：" + df.format(v2050100));
            System.out.println("板数：" + ban50100);
            System.out.println("中股天数："+dateList50100.size());

            double v100200 = 0;
            double vz100200 = 0;
            double vf100200 = 0;
            double v2100200 = 0;
            double v3100200 = 0;
            double v5100200 = 0;
            double v10100200 = 0;
            double v20100200 = 0;

            if (num0100200 != 0 && sum100200 != 0) {
                v100200 = sum100200 / num0100200;
                vz100200= sumz100200 / numu100200;
                vf100200= sumf100200 / numd100200;
            }
            if (num0100200 != 0 && sum2100200 != 0) {
                v2100200 = sum3100200 / num0100200;
            }
            if (num0100200 != 0 && sum3100200 != 0) {
                v3100200 = sum3100200 / num0100200;
            }
            if (num0100200 != 0 && sum5100200 != 0) {
                v5100200 = sum5100200 / num0100200;
            }
            if (num0100200 != 0 && sum10100200 != 0) {
                v10100200 = sum10100200 / num0100200;
            }
            if (num0100200 != 0 && sum20100200 != 0) {
                v20100200 = sum20100200 / num0100200;
            }

            System.out.println("----------");
            System.out.println("100-200");
            System.out.println(("一天后涨的次数：" + numu100200 + "  跌的次数：" + numd100200 + "  上涨概率： " + df.format((double) numu100200 * 100 / num0100200)) + "%  平均涨跌幅：" + df.format(v100200)+ "%  平均涨幅：" + df.format(vz100200)+ "%  平均跌幅：" + df.format(vf100200));
            System.out.println(("2天后涨的次数：" + numu2100200 + "  跌的次数：" + numd2100200 + "  上涨概率： " + df.format((double) numu2100200 * 100 / num0100200)) + "%  平均涨幅：" + df.format(v2100200));
            System.out.println(("3天后涨的次数：" + numu3100200 + "  跌的次数：" + numd3100200 + "  上涨概率： " + df.format((double) numu3100200 * 100 / num0100200)) + "%  平均涨幅：" + df.format(v3100200));

            System.out.println(("5天后涨的次数：" + numu5100200 + "  跌的次数：" + numd5100200 + "  上涨概率： " + df.format((double) numu5100200*100 / num0100200))+"%  平均涨幅：" + df.format(v5100200));
            System.out.println(("10天后涨的次数：" + numu10100200 + "  跌的次数：" + numd10100200 + "  上涨概率： " + df.format((double) numu10100200*100 / num0100200))+"%  平均涨幅：" + df.format(v10100200));
            System.out.println(("20天后涨的次数：" + numu20100200 + "  跌的次数：" + numd20100200 + "  上涨概率： " + df.format((double) numu20100200*100 / num0100200))+"%  平均涨幅：" + df.format(v20100200));
            System.out.println("板数：" + ban100200);
            System.out.println("中股天数："+dateList100200.size());

            double v200300 = 0;
            double vz200300 = 0;
            double vf200300 = 0;
            double v2200300 = 0;
            double v3200300 = 0;
            double v5200300 = 0;
            double v10200300 = 0;
            double v20200300 = 0;

            if (num0200300 != 0 && sum200300 != 0) {
                v200300 = sum200300 / num0200300;
                vz200300= sumz200300 / numu200300;
                vf200300= sumf200300 / numd200300;
            }
            if (num0200300 != 0 && sum2200300 != 0) {
                v2200300 = sum2200300 / num0200300;
            }
            if (num0200300 != 0 && sum3200300 != 0) {
                v3200300 = sum3200300 / num0200300;
            }
            if (num0200300 != 0 && sum5200300 != 0) {
                v5200300 = sum5200300 / num0200300;
            }
            if (num0200300 != 0 && sum10200300 != 0) {
                v10200300 = sum10200300 / num0200300;
            }
            if (num0200300 != 0 && sum20200300 != 0) {
                v20200300 = sum20200300 / num0200300;
            }

            System.out.println("----------");
            System.out.println("200-300");
            System.out.println(("一天后涨的次数：" + numu200300 + "  跌的次数：" + numd200300 + "  上涨概率： " + df.format((double) numu200300 * 100 / num0200300)) + "%  平均涨跌幅：" + df.format(v200300)+ "%  平均涨幅：" + df.format(vz200300)+ "%  平均跌幅：" + df.format(vf200300));
            System.out.println(("2天后涨的次数：" + numu2200300 + "  跌的次数：" + numd2200300 + "  上涨概率： " + df.format((double) numu2200300 * 100 / num0200300)) + "%  平均涨幅：" + df.format(v2200300));
            System.out.println(("3天后涨的次数：" + numu3200300 + "  跌的次数：" + numd3200300 + "  上涨概率： " + df.format((double) numu3200300 * 100 / num0200300)) + "%  平均涨幅：" + df.format(v3200300));

            System.out.println(("5天后涨的次数：" + numu5200300 + "  跌的次数：" + numd5200300 + "  上涨概率： " + df.format((double) numu5200300*100 / num0200300))+"%  平均涨幅：" + df.format(v5200300));
            System.out.println(("10天后涨的次数：" + numu10200300 + "  跌的次数：" + numd10200300 + "  上涨概率： " + df.format((double) numu10200300*100 / num0200300))+"%  平均涨幅：" + df.format(v10200300));
            System.out.println(("20天后涨的次数：" + numu20200300 + "  跌的次数：" + numd20200300 + "  上涨概率： " + df.format((double) numu20200300*100 / num0200300))+"%  平均涨幅：" + df.format(v20200300));
            System.out.println("板数：" + ban200300);
            System.out.println("中股天数："+dateList200300.size());


            double v300400 = 0;
            double vz300400 = 0;
            double vf300400 = 0;
            double v2300400 = 0;
            double v3300400 = 0;
            double v5300400 = 0;
            double v10300400 = 0;
            double v20300400 = 0;

            if (num0300400 != 0 && sum300400 != 0) {
                v300400 = sum300400 / num0300400;
                vz300400= sumz300400 / numu300400;
                vf300400= sumf300400 / numd300400;
            }
            if (num0300400 != 0 && sum2300400 != 0) {
                v2300400 = sum2300400 / num0300400;
            }
            if (num0300400 != 0 && sum3300400 != 0) {
                v3300400 = sum3300400 / num0300400;
            }
            if (num0300400 != 0 && sum5300400 != 0) {
                v5300400 = sum5300400 / num0300400;
            }
            if (num0300400 != 0 && sum10300400 != 0) {
                v10300400 = sum10300400 / num0300400;
            }
            if (num0300400 != 0 && sum20300400 != 0) {
                v20300400 = sum20300400 / num0300400;
            }

            System.out.println("----------");
            System.out.println("300-400");
            System.out.println(("一天后涨的次数：" + numu300400 + "  跌的次数：" + numd300400 + "  上涨概率： " + df.format((double) numu300400 * 100 / num0300400)) + "%  平均涨跌幅：" + df.format(v300400)+ "%  平均涨幅：" + df.format(vz300400)+ "%  平均跌幅：" + df.format(vf300400));
            System.out.println(("2天后涨的次数：" + numu2300400 + "  跌的次数：" + numd2300400 + "  上涨概率： " + df.format((double) numu2300400 * 100 / num0300400)) + "%  平均涨幅：" + df.format(v2300400));
            System.out.println(("3天后涨的次数：" + numu3300400 + "  跌的次数：" + numd3300400 + "  上涨概率： " + df.format((double) numu3300400 * 100 / num0300400)) + "%  平均涨幅：" + df.format(v3300400));

            System.out.println(("5天后涨的次数：" + numu5300400 + "  跌的次数：" + numd5300400 + "  上涨概率： " + df.format((double) numu5300400*100 / num0300400))+"%  平均涨幅：" + df.format(v5300400));
            System.out.println(("10天后涨的次数：" + numu10300400 + "  跌的次数：" + numd10300400 + "  上涨概率： " + df.format((double) numu10300400*100 / num0300400))+"%  平均涨幅：" + df.format(v10300400));
            System.out.println(("20天后涨的次数：" + numu20300400 + "  跌的次数：" + numd20300400 + "  上涨概率： " + df.format((double) numu20300400*100 / num0300400))+"%  平均涨幅：" + df.format(v20300400));
            System.out.println("板数：" + ban300400);
            System.out.println("中股天数："+dateList300400.size());

            double v400500 = 0;
            double vz400500 = 0;
            double vf400500 = 0;
            double v2400500 = 0;
            double v3400500 = 0;
            double v5400500 = 0;
            double v10400500 = 0;
            double v20400500 = 0;

            if (num0400500 != 0 && sum400500 != 0) {
                v400500 = sum400500 / num0400500;
                vz400500= sumz400500 / numu400500;
                vf400500= sumf400500 / numd400500;
            }
            if (num0400500 != 0 && sum2400500 != 0) {
                v2400500 = sum2400500 / num0400500;
            }
            if (num0400500 != 0 && sum3400500 != 0) {
                v3400500 = sum3400500 / num0400500;
            }
            if (num0400500 != 0 && sum5400500 != 0) {
                v5400500 = sum5400500 / num0400500;
            }
            if (num0400500 != 0 && sum10400500 != 0) {
                v10400500 = sum10400500 / num0400500;
            }
            if (num0400500 != 0 && sum20400500 != 0) {
                v20400500 = sum20400500 / num0400500;
            }

            System.out.println("----------");
            System.out.println("400-500");
            System.out.println(("一天后涨的次数：" + numu400500 + "  跌的次数：" + numd400500 + "  上涨概率： " + df.format((double) numu400500 * 100 / num0400500)) + "%  平均涨跌幅：" + df.format(v400500)+ "%  平均涨幅：" + df.format(vz400500)+ "%  平均跌幅：" + df.format(vf400500));
            System.out.println(("2天后涨的次数：" + numu2400500 + "  跌的次数：" + numd2400500 + "  上涨概率： " + df.format((double) numu2400500 * 100 / num0400500)) + "%  平均涨幅：" + df.format(v2400500));
            System.out.println(("3天后涨的次数：" + numu3400500 + "  跌的次数：" + numd3400500 + "  上涨概率： " + df.format((double) numu3400500 * 100 / num0400500)) + "%  平均涨幅：" + df.format(v3400500));

            System.out.println(("5天后涨的次数：" + numu5400500 + "  跌的次数：" + numd5400500 + "  上涨概率： " + df.format((double) numu5400500*100 / num0400500))+"%  平均涨幅：" + df.format(v5400500));
            System.out.println(("10天后涨的次数：" + numu10400500 + "  跌的次数：" + numd10400500 + "  上涨概率： " + df.format((double) numu10400500*100 / num0400500))+"%  平均涨幅：" + df.format(v10400500));
            System.out.println(("20天后涨的次数：" + numu20400500 + "  跌的次数：" + numd20400500 + "  上涨概率： " + df.format((double) numu20400500*100 / num0400500))+"%  平均涨幅：" + df.format(v20400500));
            System.out.println("板数：" + ban400500);
            System.out.println("中股天数："+dateList400500.size());

            double v500600 = 0;
            double vz500600 = 0;
            double vf500600 = 0;
            double v2500600 = 0;
            double v3500600 = 0;
            double v5500600 = 0;
            double v10500600 = 0;
            double v20500600 = 0;

            if (num0500600 != 0 && sum500600 != 0) {
                v500600 = sum500600 / num0500600;
                vz500600= sumz500600 / numu500600;
                vf500600= sumf500600 / numd500600;
            }
            if (num0500600 != 0 && sum2500600 != 0) {
                v2500600 = sum2500600 / num0500600;
            }
            if (num0500600 != 0 && sum3500600 != 0) {
                v3500600 = sum3500600 / num0500600;
            }
            if (num0500600 != 0 && sum5500600 != 0) {
                v5500600 = sum5500600 / num0500600;
            }
            if (num0500600 != 0 && sum10500600 != 0) {
                v10500600 = sum10500600 / num0500600;
            }
            if (num0500600 != 0 && sum20500600 != 0) {
                v20500600 = sum20500600 / num0500600;
            }

            System.out.println("----------");
            System.out.println("200-300");
            System.out.println(("一天后涨的次数：" + numu500600 + "  跌的次数：" + numd500600 + "  上涨概率： " + df.format((double) numu500600 * 100 / num0500600)) + "%  平均涨跌幅：" + df.format(v500600)+ "%  平均涨幅：" + df.format(vz500600)+ "%  平均跌幅：" + df.format(vf500600));
            System.out.println(("2天后涨的次数：" + numu2500600 + "  跌的次数：" + numd2500600 + "  上涨概率： " + df.format((double) numu2500600 * 100 / num0500600)) + "%  平均涨幅：" + df.format(v2500600));
            System.out.println(("3天后涨的次数：" + numu3500600 + "  跌的次数：" + numd3500600 + "  上涨概率： " + df.format((double) numu3500600 * 100 / num0500600)) + "%  平均涨幅：" + df.format(v3500600));

            System.out.println(("5天后涨的次数：" + numu5500600 + "  跌的次数：" + numd5500600 + "  上涨概率： " + df.format((double) numu5500600*100 / num0500600))+"%  平均涨幅：" + df.format(v5500600));
            System.out.println(("10天后涨的次数：" + numu10500600 + "  跌的次数：" + numd10500600 + "  上涨概率： " + df.format((double) numu10500600*100 / num0500600))+"%  平均涨幅：" + df.format(v10500600));
            System.out.println(("20天后涨的次数：" + numu20500600 + "  跌的次数：" + numd20500600 + "  上涨概率： " + df.format((double) numu20500600*100 / num0500600))+"%  平均涨幅：" + df.format(v20500600));
            System.out.println("板数：" + ban500600);
            System.out.println("中股天数："+dateList500600.size());

            double v600700 = 0;
            double vz600700 = 0;
            double vf600700 = 0;
            double v2600700 = 0;
            double v3600700 = 0;
            double v5600700 = 0;
            double v10600700 = 0;
            double v20600700 = 0;

            if (num0600700 != 0 && sum600700 != 0) {
                v600700 = sum600700 / num0600700;
                vz600700= sumz600700 / numu600700;
                vf600700= sumf600700 / numd600700;
            }
            if (num0600700 != 0 && sum2600700 != 0) {
                v2600700 = sum2600700 / num0600700;
            }
            if (num0600700 != 0 && sum3600700 != 0) {
                v3600700 = sum3600700 / num0600700;
            }
            if (num0600700 != 0 && sum5600700 != 0) {
                v5600700 = sum5600700 / num0600700;
            }
            if (num0600700 != 0 && sum10600700 != 0) {
                v10600700 = sum10600700 / num0600700;
            }
            if (num0600700 != 0 && sum20600700 != 0) {
                v20600700 = sum20600700 / num0600700;
            }

            System.out.println("----------");
            System.out.println("200-300");
            System.out.println(("一天后涨的次数：" + numu600700 + "  跌的次数：" + numd600700 + "  上涨概率： " + df.format((double) numu600700 * 100 / num0600700)) + "%  平均涨跌幅：" + df.format(v600700)+ "%  平均涨幅：" + df.format(vz600700)+ "%  平均跌幅：" + df.format(vf600700));
            System.out.println(("2天后涨的次数：" + numu2600700 + "  跌的次数：" + numd2600700 + "  上涨概率： " + df.format((double) numu2600700 * 100 / num0600700)) + "%  平均涨幅：" + df.format(v2600700));
            System.out.println(("3天后涨的次数：" + numu3600700 + "  跌的次数：" + numd3600700 + "  上涨概率： " + df.format((double) numu3600700 * 100 / num0600700)) + "%  平均涨幅：" + df.format(v3600700));

            System.out.println(("5天后涨的次数：" + numu5600700 + "  跌的次数：" + numd5600700 + "  上涨概率： " + df.format((double) numu5600700*100 / num0600700))+"%  平均涨幅：" + df.format(v5600700));
            System.out.println(("10天后涨的次数：" + numu10600700 + "  跌的次数：" + numd10600700 + "  上涨概率： " + df.format((double) numu10600700*100 / num0600700))+"%  平均涨幅：" + df.format(v10600700));
            System.out.println(("20天后涨的次数：" + numu20600700 + "  跌的次数：" + numd20600700 + "  上涨概率： " + df.format((double) numu20600700*100 / num0600700))+"%  平均涨幅：" + df.format(v20600700));
            System.out.println("板数：" + ban600700);
            System.out.println("中股天数："+dateList600700.size());

            double v700u = 0;
            double vz700u = 0;
            double vf700u = 0;
            double v2700u = 0;
            double v3700u = 0;
            double v5700u = 0;
            double v10700u = 0;
            double v20700u = 0;

            if (num0700u != 0 && sum700u != 0) {
                v700u = sum700u / num0700u;
                vz700u= sumz700u / numu700u;
                vf700u= sumf700u / numd700u;
            }
            if (num0700u != 0 && sum2700u != 0) {
                v2700u = sum2700u / num0700u;
            }
            if (num0700u != 0 && sum3700u != 0) {
                v3700u = sum3700u / num0700u;
            }
            if (num0700u != 0 && sum5700u != 0) {
                v5700u = sum5700u / num0700u;
            }
            if (num0700u != 0 && sum10700u != 0) {
                v10700u = sum10700u / num0700u;
            }
            if (num0700u != 0 && sum20700u != 0) {
                v20700u = sum20700u / num0700u;
            }

            System.out.println("----------");
            System.out.println("200-300");
            System.out.println(("一天后涨的次数：" + numu700u + "  跌的次数：" + numd700u + "  上涨概率： " + df.format((double) numu700u * 100 / num0700u)) + "%  平均涨跌幅：" + df.format(v700u)+ "%  平均涨幅：" + df.format(vz700u)+ "%  平均跌幅：" + df.format(vf700u));
            System.out.println(("2天后涨的次数：" + numu2700u + "  跌的次数：" + numd2700u + "  上涨概率： " + df.format((double) numu2700u * 100 / num0700u)) + "%  平均涨幅：" + df.format(v2700u));
            System.out.println(("3天后涨的次数：" + numu3700u + "  跌的次数：" + numd3700u + "  上涨概率： " + df.format((double) numu3700u * 100 / num0700u)) + "%  平均涨幅：" + df.format(v3700u));

            System.out.println(("5天后涨的次数：" + numu5700u + "  跌的次数：" + numd5700u + "  上涨概率： " + df.format((double) numu5700u*100 / num0700u))+"%  平均涨幅：" + df.format(v5700u));
            System.out.println(("10天后涨的次数：" + numu10700u + "  跌的次数：" + numd10700u + "  上涨概率： " + df.format((double) numu10700u*100 / num0700u))+"%  平均涨幅：" + df.format(v10700u));
            System.out.println(("20天后涨的次数：" + numu20700u + "  跌的次数：" + numd20700u + "  上涨概率： " + df.format((double) numu20700u*100 / num0700u))+"%  平均涨幅：" + df.format(v20700u));
            System.out.println("板数：" + ban700u);
            System.out.println("中股天数："+dateList700u.size());

            double vall = 0;
            double vzall = 0;
            double vfall = 0;
            double v2all = 0;
            double v3all = 0;
            double v5all = 0;
            double v10all = 0;
            double v20all = 0;

            if (num0all != 0 && sumall != 0) {
                vall = sumall / num0all;
                vzall= sumzall / numuall;
                vfall= sumfall / numdall;
            }
            if (num0all != 0 && sum2all != 0) {
                v2all = sum2all / num0all;
            }
            if (num0all != 0 && sum3all != 0) {
                v3all = sum3all / num0all;
            }
            if (num0all != 0 && sum5all != 0) {
                v5all = sum5all / num0all;
            }
            if (num0all != 0 && sum10all != 0) {
                v10all = sum10all / num0all;
            }
            if (num0all != 0 && sum20all != 0) {
                v20all = sum20all / num0all;
            }

            System.out.println("----------");
            System.out.println("所有");
            System.out.println(("一天后涨的次数：" + numuall + "  跌的次数：" + numdall + "  上涨概率： " + df.format((double) numuall * 100 / num0all)) + "%  平均涨跌幅：" + df.format(vall)+ "%  平均涨幅：" + df.format(vzall)+ "%  平均跌幅：" + df.format(vfall));
            System.out.println(("2天后涨的次数：" + numu2all + "  跌的次数：" + numd2all + "  上涨概率： " + df.format((double) numu2all * 100 / num0all)) + "%  平均涨幅：" + df.format(v2all));
            System.out.println(("3天后涨的次数：" + numu3all + "  跌的次数：" + numd3all + "  上涨概率： " + df.format((double) numu3all * 100 / num0all)) + "%  平均涨幅：" + df.format(v3all));

            System.out.println(("5天后涨的次数：" + numu5all + "  跌的次数：" + numd5all + "  上涨概率： " + df.format((double) numu5all*100 / num0all))+"%  平均涨幅：" + df.format(v5all));
            System.out.println(("10天后涨的次数：" + numu10all + "  跌的次数：" + numd10all + "  上涨概率： " + df.format((double) numu10all*100 / num0all))+"%  平均涨幅：" + df.format(v10all));
            System.out.println(("20天后涨的次数：" + numu20all + "  跌的次数：" + numd20all + "  上涨概率： " + df.format((double) numu20all*100 / num0all))+"%  平均涨幅：" + df.format(v20all));
            System.out.println("板数：" + banall);
            System.out.println("中股天数："+dateListall.size());
        }

    }
    //              开   收盘  最高    最低  成交额  成交量        振幅 涨跌幅 涨跌额 换手率  市盈率
    // 2025-03-21,75.60,71.77,76.22,71.77,36859,270881026.00,5.82,-6.17,-4.72,13.41
    public static void getData(Stock_Json_Data stockJsonData) throws Exception {
        String jsondata = stockJsonData.getJsondata();
        String name = stockJsonData.getName();
        /*JSONObject jsonObject = JSONObject.parseObject(jsondata);

        String o = jsonObject.get(stockJsonData.getName()).toString();*/
        List list = JSONArray.parseArray(jsondata);

        if (list.size() >  140) {

            for (int i = 2; i < 21; i++) {
                String [] split = list.get(i).toString().split(",");
                String [] split10 = list.get(i+1).toString().split(",");
                String [] split20 = list.get(i+2).toString().split(",");
                String [] split30 = list.get(i+3).toString().split(",");
                String [] split40 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split10[8]);
                double v02= Double.parseDouble(split20[8]);
                double v03= Double.parseDouble(split30[8]);
                double v04= Double.parseDouble(split40[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split10[1]);
                //收盘价
                double s1= Double.parseDouble(split10[2]);
                //最高价
                double g1= Double.parseDouble(split10[3]);
                //最低价
                double d1= Double.parseDouble(split10[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    //次日涨幅
                    String [] split1 = list.get(i-1).toString().split(",");
                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu020++;
                        sumz020+=v11;
                    } else {
                        sumf020+=v11;
                        numd020++;
                    }
                    if (v12 > 0 || v12 == 0) {
                        numu2020++;
                    } else {
                        numd2020++;
                    }

                    sum020 += v11;
                    sum2020 += v12;
                    num0020++;
                    if (!dateList020.contains(split[0])) {
                        dateList020.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban020++;
                    }
                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12);
                }
            }
        }

        if (list.size() >  170) {
            for (int i = 21; i < 50; i++) {
                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {


                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅
                    String [] split1 = list.get(i-1).toString().split(",");
                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu2050++;
                        sumz2050+=v11;
                    } else {
                        sumf2050+=v11;
                        numd2050++;
                    }
                    if(v12>0||v12==0){
                        numu22050++;
                    }else {
                        numd22050++;
                    }
                    sum2050 += v11;
                    sum22050 += v12;
                    sum32050 += v3;
                    sum52050 += v5;
                    sum102050 += v10;
                    sum202050 += v20;

                    num02050++;

                    if (s03 > s) {
                        numu32050++;
                    } else {
                        numd32050++;
                    }

                    if (s05 > s) {
                        numu52050++;
                    } else {
                        numd52050++;
                    }

                    if (s10 > s) {
                        numu102050++;
                    } else {
                        numd102050++;
                    }

                    if (s20 > s) {
                        numu202050++;
                    } else {
                        numd202050++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList2050.contains(split[0])) {
                        dateList2050.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban2050++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  220) {
            for (int i = 50; i < 100; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");
                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu50100++;
                        sumz50100+=v11;
                    } else {
                        sumf50100+=v11;
                        numd50100++;
                    }
                    if(v12>0||v12==0){
                        numu250100++;
                    }else {
                        numd250100++;
                    }
                    sum50100 += v11;
                    sum250100 += v12;
                    sum350100 += v3;
                    sum550100 += v5;
                    sum1050100 += v10;
                    sum2050100 += v20;

                    num050100++;

                    if (s03 > s) {
                        numu350100++;
                    } else {
                        numd350100++;
                    }

                    if (s05 > s) {
                        numu550100++;
                    } else {
                        numd550100++;
                    }

                    if (s10 > s) {
                        numu1050100++;
                    } else {
                        numd1050100++;
                    }

                    if (s20 > s) {
                        numu2050100++;
                    } else {
                        numd2050100++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList50100.contains(split[0])) {
                        dateList50100.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban50100++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  320) {
            for (int i = 100; i < 200; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu100200++;
                        sumz100200+=v11;
                    } else {
                        sumf100200+=v11;
                        numd100200++;
                    }
                    if(v12>0||v12==0){
                        numu2100200++;
                    }else {
                        numd2100200++;
                    }
                    sum100200 += v11;
                    sum2100200 += v12;
                    sum3100200 += v3;
                    sum5100200 += v5;
                    sum10100200 += v10;
                    sum20100200 += v20;

                    num0100200++;

                    if (s03 > s) {
                        numu3100200++;
                    } else {
                        numd3100200++;
                    }

                    if (s05 > s) {
                        numu5100200++;
                    } else {
                        numd5100200++;
                    }

                    if (s10 > s) {
                        numu10100200++;
                    } else {
                        numd10100200++;
                    }

                    if (s20 > s) {
                        numu20100200++;
                    } else {
                        numd20100200++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList100200.contains(split[0])) {
                        dateList100200.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban100200++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  420) {
            for (int i = 200; i < 300; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu200300++;
                        sumz200300+=v11;
                    } else {
                        sumf200300+=v11;
                        numd200300++;
                    }
                    if(v12>0||v12==0){
                        numu2200300++;
                    }else {
                        numd2200300++;
                    }
                    sum200300 += v11;
                    sum2200300 += v12;
                    sum3200300 += v3;
                    sum5200300 += v5;
                    sum10200300 += v10;
                    sum20200300 += v20;

                    num0200300++;

                    if (s03 > s) {
                        numu3200300++;
                    } else {
                        numd3200300++;
                    }

                    if (s05 > s) {
                        numu5200300++;
                    } else {
                        numd5200300++;
                    }

                    if (s10 > s) {
                        numu10200300++;
                    } else {
                        numd10200300++;
                    }

                    if (s20 > s) {
                        numu20200300++;
                    } else {
                        numd20200300++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList200300.contains(split[0])) {
                        dateList200300.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban200300++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  520) {
            for (int i = 300; i < 400; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu300400++;
                        sumz300400+=v11;
                    } else {
                        sumf300400+=v11;
                        numd300400++;
                    }
                    if(v12>0||v12==0){
                        numu2300400++;
                    }else {
                        numd2300400++;
                    }
                    sum300400 += v11;
                    sum2300400 += v12;
                    sum3300400 += v3;
                    sum5300400 += v5;
                    sum10300400 += v10;
                    sum20300400 += v20;

                    num0300400++;

                    if (s03 > s) {
                        numu3300400++;
                    } else {
                        numd3300400++;
                    }

                    if (s05 > s) {
                        numu5300400++;
                    } else {
                        numd5300400++;
                    }

                    if (s10 > s) {
                        numu10300400++;
                    } else {
                        numd10300400++;
                    }

                    if (s20 > s) {
                        numu20300400++;
                    } else {
                        numd20300400++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList300400.contains(split[0])) {
                        dateList300400.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban300400++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }
        if (list.size() >  620) {
            for (int i = 400; i < 500; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu400500++;
                        sumz400500+=v11;
                    } else {
                        sumf400500+=v11;
                        numd400500++;
                    }
                    if(v12>0||v12==0){
                        numu2400500++;
                    }else {
                        numd2400500++;
                    }
                    sum400500 += v11;
                    sum2400500 += v12;
                    sum3400500 += v3;
                    sum5400500 += v5;
                    sum10400500 += v10;
                    sum20400500 += v20;

                    num0400500++;

                    if (s03 > s) {
                        numu3400500++;
                    } else {
                        numd3400500++;
                    }

                    if (s05 > s) {
                        numu5400500++;
                    } else {
                        numd5400500++;
                    }

                    if (s10 > s) {
                        numu10400500++;
                    } else {
                        numd10400500++;
                    }

                    if (s20 > s) {
                        numu20400500++;
                    } else {
                        numd20400500++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList400500.contains(split[0])) {
                        dateList400500.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban400500++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }
        if (list.size() >  720) {
            for (int i = 500; i < 600; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");
                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu500600++;
                        sumz500600+=v11;
                    } else {
                        sumf500600+=v11;
                        numd500600++;
                    }
                    if(v12>0||v12==0){
                        numu2500600++;
                    }else {
                        numd2500600++;
                    }
                    sum500600 += v11;
                    sum2500600 += v12;
                    sum3500600 += v3;
                    sum5500600 += v5;
                    sum10500600 += v10;
                    sum20500600 += v20;

                    num0500600++;

                    if (s03 > s) {
                        numu3500600++;
                    } else {
                        numd3500600++;
                    }

                    if (s05 > s) {
                        numu5500600++;
                    } else {
                        numd5500600++;
                    }

                    if (s10 > s) {
                        numu10500600++;
                    } else {
                        numd10500600++;
                    }

                    if (s20 > s) {
                        numu20500600++;
                    } else {
                        numd20500600++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList500600.contains(split[0])) {
                        dateList500600.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban500600++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }
        if (list.size() >  820) {
            for (int i = 600; i < 700; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu600700++;
                        sumz600700+=v11;
                    } else {
                        sumf600700+=v11;
                        numd600700++;
                    }
                    if(v12>0||v12==0){
                        numu2600700++;
                    }else {
                        numd2600700++;
                    }
                    sum600700 += v11;
                    sum2600700 += v12;
                    sum3600700 += v3;
                    sum5600700 += v5;
                    sum10600700 += v10;
                    sum20600700 += v20;

                    num0600700++;

                    if (s03 > s) {
                        numu3600700++;
                    } else {
                        numd3600700++;
                    }

                    if (s05 > s) {
                        numu5600700++;
                    } else {
                        numd5600700++;
                    }

                    if (s10 > s) {
                        numu10600700++;
                    } else {
                        numd10600700++;
                    }

                    if (s20 > s) {
                        numu20600700++;
                    } else {
                        numd20600700++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList600700.contains(split[0])) {
                        dateList600700.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban600700++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  920&&list.size()<3200) {
            int length = list.size();
            for (int i = 700; i < length-120; i++) {

                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");

                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numu700u++;
                        sumz700u+=v11;
                    } else {
                        sumf700u+=v11;
                        numd700u++;
                    }
                    if(v12>0||v12==0){
                        numu2700u++;
                    }else {
                        numd2700u++;
                    }
                    sum700u += v11;
                    sum2700u += v12;
                    sum3700u += v3;
                    sum5700u += v5;
                    sum10700u += v10;
                    sum20700u += v20;

                    num0700u++;

                    if (s03 > s) {
                        numu3700u++;
                    } else {
                        numd3700u++;
                    }

                    if (s05 > s) {
                        numu5700u++;
                    } else {
                        numd5700u++;
                    }

                    if (s10 > s) {
                        numu10700u++;
                    } else {
                        numd10700u++;
                    }

                    if (s20 > s) {
                        numu20700u++;
                    } else {
                        numd20700u++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateList700u.contains(split[0])) {
                        dateList700u.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        ban700u++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }

        if (list.size() >  120&&list.size()<3200) {
            int length = list.size();
            for (int i = 21; i < length-120; i++) {
                String [] split = list.get(i).toString().split(",");
                String [] split01 = list.get(i+1).toString().split(",");
                String [] split02 = list.get(i+2).toString().split(",");
                String [] split03 = list.get(i+3).toString().split(",");
                String [] split04 = list.get(i+4).toString().split(",");
                //涨幅
                double v= Double.parseDouble(split[8]);
                double v01= Double.parseDouble(split01[8]);
                double v02= Double.parseDouble(split02[8]);
                double v03= Double.parseDouble(split03[8]);
                double v04= Double.parseDouble(split04[8]);

                //开盘价
                double k= Double.parseDouble(split[1]);
                //收盘价
                double s= Double.parseDouble(split[2]);
                //最高价
                double g= Double.parseDouble(split[3]);
                //最低价
                double d= Double.parseDouble(split[4]);

                //开盘价
                double k1= Double.parseDouble(split01[1]);
                //收盘价
                double s1= Double.parseDouble(split01[2]);
                //最高价
                double g1= Double.parseDouble(split01[3]);
                //最低价
                double d1= Double.parseDouble(split01[4]);

                boolean b = v > 0 && v01 < 0 && v02 < 0 && v03 < 0 && v04 < 0;
                boolean b1 = k < s1 && s > k1;

                if (b&&b1) {
                    String [] split1 = list.get(i-1).toString().split(",");
                    //第3天收盘价
                    String [] split3 = list.get(i-3).toString().split(",");
                    //收盘价
                    double s03= Double.parseDouble(split3[2]);
                    double v3 = (s03 - s)*100 / s;

                    //第5天收盘价
                    String [] split5 = list.get(i-5).toString().split(",");
                    //收盘价
                    double s05= Double.parseDouble(split5[2]);
                    double v5 = (s05 - s)*100 / s;

                    //第10天收盘价
                    String [] split10 = list.get(i-10).toString().split(",");
                    //收盘价
                    double s10= Double.parseDouble(split10[2]);
                    double v10 = (s10 - s)*100 / s;

                    //第20天收盘价
                    String [] split20 = list.get(i-20).toString().split(",");
                    //收盘价
                    double s20= Double.parseDouble(split20[2]);
                    double v20 = (s20 - s)*100 / s;

                    //次日涨幅

                    double v11= Double.parseDouble(split1[8]);
                    //第二日涨幅
                    String [] split2 = list.get(i-2).toString().split(",");
                    double v12= Double.parseDouble(split2[8]);

                    if (v11 > 0 || v11 == 0) {
                        numuall++;
                        sumzall+=v11;
                    } else {
                        sumfall+=v11;
                        numdall++;
                    }
                    if(v12>0||v12==0){
                        numu2all++;
                    }else {
                        numd2all++;
                    }
                    sumall += v11;
                    sum2all += v12;
                    sum3all += v3;
                    sum5all += v5;
                    sum10all += v10;
                    sum20all += v20;

                    num0all++;

                    if (s03 > s) {
                        numu3all++;
                    } else {
                        numd3all++;
                    }

                    if (s05 > s) {
                        numu5all++;
                    } else {
                        numd5all++;
                    }

                    if (s10 > s) {
                        numu10all++;
                    } else {
                        numd10all++;
                    }

                    if (s20 > s) {
                        numu20all++;
                    } else {
                        numd20all++;
                    }
                      /*  String date = stockDayData.get(i).getGetdate();
                        if(date.startsWith("2023")){
                            System.out.println(date);
                        }*/
                    if (!dateListall.contains(split[0])) {
                        dateListall.add(split[0]);
                    }
                    if (v11 > 9.8) {
                        banall++;
                    }

                    System.out.println(name + " : " + split[0] + "  当日涨幅" + v + "   次日涨幅" + v11+ "   第二日涨幅" + v12 + "   3日涨幅" + df.format(v3)+ "   5日涨幅" + df.format(v5)+ "   10日涨幅" + df.format(v10)+ "   20日涨幅" + df.format(v20));
                }
            }
        }


    }
}

